
class NodeModel(object):
    def __init__(self):
        self.tStateDim = [];
        self.nReward, self.tReward = 0, "";
        self.nValue, self.tValue = 0, "";
        self.nDistance, self.tDistance = 0.0, "";
        self.nStateId, self.tStateId = 0, "";
        self.nStateType = 0;
        self.nGrpId, self.sAct = 0, "";
        self.nStartFrm, self.nEndFrm = 0, 0;
        self.sRole, self.sPersons = "", "" ;
        self.tGrpId, self.tFrmRng = "", "";
        self.tRole, self.tAct = "", "";
    
    []#Set State Values
    def setGrpId(self, nGrpId):
        self.nGrpId = int(nGrpId);
        self.tGrpId = str(nGrpId);
    
    def setAct(self, sAct):
        self.sAct = sAct;
        self.tAct = str(sAct);
        
    def setStartFrm(self, nStartFrm):
        self.nStartFrm = int(nStartFrm) if self.nStartFrm==-1 else self.nStartFrm;
        self.setFrmRng(nStartFrm);
        
    def setEndFrm(self, nEndFrm):
        self.nEndFrm = int(nEndFrm) if self.nEndFrm==-1 else self.nEndFrm;
        self.setFrmRng(nEndFrm=nEndFrm);        
        
    def setFrmRng(self, nStartFrm=-1, nEndFrm=-1):
        self.nStartFrm = int(nStartFrm) if nStartFrm!=-1 else self.nStartFrm;
        self.nEndFrm = int(nEndFrm) if nEndFrm!=-1 else self.nEndFrm;
        self.tFrmRng = "["+str(self.nStartFrm)+"-"+str(self.nEndFrm)+"]";
        
    def setRole(self, sRole):
        self.sRole = sRole;
        self.tRole = "&lt;"+sRole+"&gt;";
        
    def setPersons(self, sPersons):
        self.sPersons = sPersons;
    
    def setStateId(self, nStateId):
        self.nStateId = int(nStateId);
        self.tStateId = str(nStateId);
        
    def setReward(self, nReward):
        self.nReward = round(float(nReward),3);
        self.tReward = "R=" + str(self.nReward);
    
    def setValue(self, nValue):
        self.nValue = round(float(nValue),1);
        self.tValue = "V=" + str(self.nValue);
    
    def setDistance(self, nDistance):
        self.nDistance = round(float(nDistance),3);
        self.tDistance = "D=" + str(self.nDistance);
        
    def setStateDim(self, stateDim):
        self.tStateDim = stateDim;
        
    def setStateType(self, nStateType):
        self.nStateType = nStateType;
        
    
    []#Get State Values
    def getGrpId(self):
        return self.nGrpId;
    
    def getAct(self):
        return self.sAct;
        
    def getRole(self, sRole):
        return self.sRole;
        
    def getStartFrm(self):
        return self.nStartFrm;
        
    def getEndFrm(self):
        return self.nEndFrm;
        
    def getPersons(self):
        return self.sPersons;
    
    def getTxtGrpId(self):
        return self.tGrpId;
    
    def getTxtAct(self):
        return self.tAct;
    
    def getTxtRole(self):
        return self.tRole;
    
    def getTxtFrmRng(self):
        return self.tFrmRng;
        
    def getStateId(self):
        return self.nStateId;
        
    def getReward(self):
        return self.nReward;
    
    def getValue(self):
        return self.nValue;
    
    def getDistance(self):
        return self.nDistance;
        
    def getTxtReward(self):
        return self.tReward;
    
    def getTxtValue(self):
        return self.tValue;
    
    def getTxtDistance(self):
        return self.tDistance;
    
    def getTxtStateId(self):
        return self.tStateId;
    
    def getStateDim(self):
        return self.tStateDim;
    
    def getStateType(self):
        return self.nStateType;
    
    GroupId = property(getGrpId, setGrpId);
    Activity = property(getAct, setAct);
    Role = property(getRole, setRole);
    StartFrm = property(getStartFrm, setStartFrm);
    EndFrm = property(getEndFrm, setEndFrm);
    Persons = property(getPersons, setPersons);
    TxtGrpId = property(getTxtGrpId);
    TxtAct = property(getTxtAct);
    TxtRole = property(getTxtRole);
    TxtFrmRng = property(getTxtFrmRng);
    StateId = property(getStateId, setStateId);
    Reward = property(getReward, setReward);
    Value = property(getValue, setValue);
    Distance = property(getDistance, setDistance);
    StateType = property(getStateType, setStateType);
    TxtReward = property(getTxtReward);
    TxtValue = property(getTxtValue);
    TxtDistance = property(getTxtDistance);
    TxtStateId = property(getTxtStateId);
    StateDim = property(getStateDim);
    